#include <iostream>
const int ArSize = 80;
int main(int argc, char const *argv[])
{
	using namespace std;
	char  line[ArSize];
	int spaces =0;
	cout << "Enter a line of text:\n";
	cin.get(line ,ArSize);
	cout <<"complete line:\n"<<line <<endl;
	for (int i = 0; line[i] != '\0'; ++i)
	{
		cout << line[i];
		if (line[i] == '.')
		{
			break;
		}
		if (line[i] != ' ')
		{
			continue;
		}
		spaces++;
	}

cout << "spaces" << spaces << endl;
	return 0;
}
